<?php
use Yaf_Session as Session;
use Yaf_Registry   as Reg;
class AdminController extends Yaf_Controller_Abstract{
    public function init(){
        // $session = Session::getInstance();
        // $session->start();
        // $user = $session->has('manager');
        // if($user){
        //     var_dump($session);
        //     $module = $this->_request->module;
        //     $controller = $this->_request->controller;
        //     $action = $this->_request->action;
        //     $url = strtolower($module.'/'.$controller.'/'.$action);
        //     $rules = $session->get('rules');
        //     $flag = array_search($url,$rules);
        //     if($flag || $flag === 0){
        //         $this->_view->userInfo = $session->get('manager');
        //     }else{
        //         echo 'debug';
        //         exit;
        //         // $this->redirect('/admin/manage/index');
        //     }
        // }else{
        //     $this->redirect('/admin/manage/index');
        // }
    }
    
}
?>
